/*----------------------------------------------------------------------------------*/
/*!
 * @file tiles.h
 * @brief Header-File der Tiles I/O Routinen
 * @author Tisi
 *
 */
/*------------------------------------------------------------------------------------

REVISION CONTROL:
$Id: tiles.h,v 1.1 2006/08/08 20:45:41 tisi Exp $
$ProjectName: $
$ProjectRevision: $

UPDATE:
$Log: tiles.h,v $
Revision 1.1  2006/08/08 20:45:41  tisi
*** empty log message ***


------------------------------------------------------------------------------------*/

#ifndef TILES_H_
#define TILES_H_

typedef struct
{
  unsigned char data[3096];
} Tile;

#define TLE_FILE_VERSION_1      100

#define TLE_OK             0
#define TLE_OPEN_ERROR    -1
#define TLE_VERSION_ERROR -2
#define TLE_READ_ERROR    -3
#define TLE_WRITE_ERROR   -4
#define TLE_ID_ERROR      -5

class TileIO
{
  public:
  TileIO();
  ~TileIO();
  char loadTilesFromFile(char *filename);
  Tile *getTile(unsigned short id);
  char setTile(unsigned short id, Tile* new_tile);  
  void createNewTileArray(unsigned short array_size);
  char saveTilesToFile(char *filename);
  
  unsigned short quantity;
  Tile* tile;
};


#endif

